<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap.min.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap-responsive.min.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/uniform.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-style2.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-media.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/font-awesome/css/font-awesome.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/changyun.css?v={#$Think.config.ADMIN_VERSION_VAL}" />
</head>
<body>
<div id="content">
  <include file="Public/maintop" />
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        <div class="widget-box">
			<div class="cyz-m-tab">
				<ul class="cyz-m-tab-title">
					<li class="cyz-m-this" href="javascript:void(0);">菜单管理</li>
				</ul>
			</div>
		  
		  <div class="widget-content" style="padding:5px;border:0px;height:30px;">
			<div class="fl table-button">
				<a href="{#:U('Menu/add')}" class="btn btn-success"><i class="icon-plus"></i> 新增</a> 
				<a href="javascript:void(0);"  class="btn btn-danger"><i class="icon-sort"></i> 排序</a>
			</div>
		  </div>
		  <div class="clear:both;"></div>
          <div class="widget-content" style="padding:5px;">
            <table class="table table-bordered table-striped">
              <thead>
                <tr>
				  <th style="width: 60px;">ID</th>
                  <th>名称</th>
                  <th>上级菜单</th>
                  <th>URL</th>
				  <th>排序</th>
				  <th style="width: 250px;">图标</th>
				  <th>是否隐藏</th>
				  <th>操作</th>
                </tr>
              </thead>
              <tbody>
			  <notempty name="list">
			  <volist name="list" id="menu">
			  <form name="form{#$menu.id}" action="__CONTROLLER__/edit" method="post">
                <tr>
				  <td><a href="{#:U('index?pid='.$menu['id'])}">{#$menu.id}</a></td>
                  <td>
					  <input type="text" name="title" value="{#$menu.title}" style="width:100px;" />
					  <!--<br /><input type="text" name="subtitle" value="{#$menu.subtitle}" style="width:100px;" />-->
				  </td>
				  <td>
					  <select name="pid" style="width:150px;">
						<volist name="Menus" id="menu_list">
							<option value="{#$menu_list.id}" <eq name="menu.pid" value="$menu_list.id">selected</eq>>{#$menu_list.title_show}</option>
						</volist>
					  </select>
				</td>
                  <td><input type="text" name="url" value="{#$menu.url}" style="width:120px;"/></td>
                  <td><input type="text" name="sort" value="{#$menu.sort}" style="width:50px;" /></td>
				  <td><input type="text" name="icon" value="{#$menu.icon}" style="width:200px;" /></td>
                  <td>
					  <select name="hide" style="width:50px;">
						<option value="1" <eq name="menu.hide" value="1">selected</eq>>是</option>
						<option value="0" <eq name="menu.hide" value="0">selected</eq>>否</option>
					  </select>
				  </td>
				  <td style="width:110px;">
				  <input type="hidden" name="id" value="{#$menu.id}" />
					<button type="submit" class="btn btn-mini btn-success"><i class="icon-pencil"></i> 更新</button>
					<button type="button" class="btn btn-mini btn-danger" onclick="dodel('{#:U('del?id='.$menu['id'])}')"><i class="icon-remove"></i> 删除</button>
				  </td>
                </tr>
				</form>
				</volist>
				<else/>
				<td colspan="9" class="text-center"> 暂时还没有内容! </td>
				</notempty>
              </tbody>
            </table>
          </div>
        </div>
	  </div>
    </div>
  </div>
</div>

<script src="__PUBLIC__/Admin/js/jquery.min.js"></script>
<script src="__PUBLIC__/Admin/js/jquery.ui.custom.js"></script>
<script src="__PUBLIC__/Admin/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/Admin/js/jquery.uniform.js"></script>
<script src="__PUBLIC__/Admin/js/matrix.js"></script>
<script src="__PUBLIC__/Admin/js/matrix.tables.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
function dodel(jump_url){
	layer.confirm('确定要删除吗', {
		title:'提示',
		icon: 0,
		btn: ['确定','取消'] //按钮
	}, function(e){
		window.location.href = jump_url;
		layer.close(e);
	}, function(e){
		layer.close(e);
	});
}
</script>
</body>
</html>
